<template>
	<view>
		<navbar :isback="true" title="当前账号"></navbar>
		<view class="item">
			<view class="u-flex u-flex-y-center">
				<view class="item__dian">
					
				</view>
				<view class="item__text">
					当前账号
				</view>
			</view>
			<view class="u-flex u-flex-y-center">
				<view class="item__val">
					{{userinfo.username}}
				</view>
				<u-icon name="/static/my/right.png" size="30rpx"></u-icon>
			</view>
		</view>
		<view class="footer">
			<u-button text="退出登录" size="large" shape='circle' @click="loginout"
				color="linear-gradient(91deg, #6E77FA, #5E77FD)" :customStyle="{height:'114rpx',boxShadow: '0rpx 5rpx 10rpx 0rpx rgba(57,150,252,0.38)'}"></u-button>
		</view>
		<view class="kf">
			<button class="u-reset-button" open-type="contact">
				<image src="/static/xishi/kf.png" class="kficon" mode=""></image>
			</button>
		</view>
		<view class="kf">
			<button class="u-reset-button" open-type="contact">
				<image src="/static/xishi/kf.png" class="kficon" mode=""></image>
			</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo:this.$store.state.userinfo
			}
		},
		methods: {
			loginout(){
				let _this=this
				uni.showModal({
					title:'是否要退出当前账号？',
					success(r) {
						if(r.confirm){
							uni.removeStorageSync('xxcstoken')
							_this.$store.commit('getuserinfo',{})
							uni.navigateBack()
						}
					}
				})
			}
		},
		onLoad() {
			// this.userinfo=this.$store.state.userinfo
		}
	}
</script>

<style lang="scss">
page{
	background-color: #F7F6F6;
}
.item{
	height: 168rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 30rpx;
	background-color: #fff;
	&__dian{
		width: 11rpx;
		height: 11rpx;
		background: #3692FF;
		border-radius: 50%;
		opacity: 0.5;
	}
	&__text{
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #000000;
		margin-left: 20rpx;
	}
	&__val{
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #000000;
	}
	
}
.footer{
	padding: 100rpx 50rpx;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 650rpx;
}
</style>
